package com.microcore.service.asserts.model;

/**
 * @author LeiZhenYang
 * @date 2019.01.11
 */
public class AssertMessage extends AssertModel {

    private boolean status;

    public AssertMessage(AssertModel model, boolean status) {
        setKey(model.getKey());
        setCondition(model.getCondition());
        setValue(model.getValue());
        setGroupCondition(model.getGroupCondition());
        setType(model.getType());
        this.status = status;
    }

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    @Override
    public String toString() {
        // 注意，以下结构用于前端显示，请勿随意修改
        return "{" +
                " \"key\":\"" + getKey() + "\"" +
                ", \"status\" : " + status +
                ", \"condition\" : " + getCondition() +
                ", \"value\" : \"" + getValue() + "\"" +
                ", \"groupCondition\" : \"" + getGroupCondition() + "\"" +
                ", \"type\" : \"" + getType() + "\"" +
                '}';
    }
}
